package com.ym.medical.dao;

import com.ym.medical.domain.entity.UserAttentionEntity;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 用户关注表Dao接口
 *
 * @author ym
 * @date 2020-08-24
 */
@Repository
public interface UserAttentionDao extends Mapper<UserAttentionEntity> {

	int insertList(@Param("pojos") List<UserAttentionEntity> pojo);

	int addAttention(@Param("attentionUserId") Long attentionUserId, @Param("attentionedUserId") Long attentionedUserId1);

	UserAttentionEntity selectByUserAttention(UserAttentionEntity userAttention);

	/***
	 * 取消关注
	 * @param attentionUserId
	 * @param attentionedUserId
	 * @return
	 */
	int cancelAttention(
			@Param("attentionUserId") Long attentionUserId,
			@Param("attentionedUserId") Long attentionedUserId);

}
